<template>
  <div class="section_common">
    <div class="main">
      <el-form ref="form" label-width="100px">
        <el-form-item label="所属仓库" required>
          <el-select v-model="area" size="mini" placeholder="请选择">
            <el-option label="上雪仓" value="2"></el-option>
            <el-option label="东莞仓" value="1"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="分类选择" required>
          <el-select v-model="type" size="mini" placeholder="请选择">
            <el-option label="办公用品" value="shenzhen"></el-option>
            <el-option label="固定资产" value="hefei"></el-option>
          </el-select>
        </el-form-item>
        <p>资产登记</p>
        <el-form-item label="物品名称" required>
          <el-input v-model="productname" size="mini"></el-input>
        </el-form-item>
        <el-form-item label="物品规格" required>
          <el-input v-model="specification" size="mini"></el-input>
        </el-form-item>
        <el-form-item label="数量" required>
          <el-input v-model="number" size="mini"></el-input>
        </el-form-item>
        <el-form-item label="备注">
          <el-input type="textarea" v-model="other" size="mini"></el-input>
        </el-form-item>
        <el-form-item>

        </el-form-item>
      </el-form>
    </div>
  </div>
</template>

<script>
  import {} from "vant";
export default {
  data() {
    return {
      area:"",
      type:"",
      productname:"",
      number:"",
      specification:"",
      other:"",

      nowUser:"",
      title: "资产登记",


    };
  },
  created() {
    this.nowUser=JSON.parse(localStorage.getItem('userInfo')).userId;
    this.id= this.$route.params.id;
    this.getInvScrapInfo();
  },
  methods: {
    getInvScrapInfo(){
      this.$https.post('/mobiles/getAddassetInfo',{
        nowUser:this.nowUser,
        id:this.id
      }).then((res)=>{

        this.area=res.data.data.area;
        this.type=res.data.data.type;
        this.productname=res.data.data.productname;
        this.number=res.data.data.number;
        this.specification=res.data.data.specification;
        this.other=res.data.data.other;

      }).catch(err => {
        console.log(err);
      })
    },
    // 返回
    goBack() {
      this.$router.go(-1);
    },
  },
};
</script>

<style lang="scss" scoped>
.main {
  display: flex;
  justify-items: center;
  margin: 0 auto;
  .el-form {
    padding-right: 10px;
    .el-form-item {
      .el-form-item__label {
        line-height: 16px;
      }
      margin-bottom: 5px;
    }
  }
}
</style>